#ifndef __painter_h__
#define __painter_h__

/* Forward Declarations */

struct ENUMDESC;

#ifndef __IHTMLPainter_FWD_DEFINED__
#define __IHTMLPainter_FWD_DEFINED__
typedef interface IHTMLPainter IHTMLPainter;
#endif     /* __IHTMLPainter_FWD_DEFINED__ */

#ifndef __IHTMLPaintSite_FWD_DEFINED__
#define __IHTMLPaintSite_FWD_DEFINED__
typedef interface IHTMLPaintSite IHTMLPaintSite;
#endif     /* __IHTMLPaintSite_FWD_DEFINED__ */

#ifndef __IHTMLPainter_FWD_DEFINED__
#define __IHTMLPainter_FWD_DEFINED__
typedef interface IHTMLPainter IHTMLPainter;
#endif     /* __IHTMLPainter_FWD_DEFINED__ */

#ifndef __IHTMLPainterEventInfo_FWD_DEFINED__
#define __IHTMLPainterEventInfo_FWD_DEFINED__
typedef interface IHTMLPainterEventInfo IHTMLPainterEventInfo;
#endif     /* __IHTMLPainterEventInfo_FWD_DEFINED__ */

#ifndef __IHTMLPainterOverlay_FWD_DEFINED__
#define __IHTMLPainterOverlay_FWD_DEFINED__
typedef interface IHTMLPainterOverlay IHTMLPainterOverlay;
#endif     /* __IHTMLPainterOverlay_FWD_DEFINED__ */

#ifndef __IHTMLPaintSite_FWD_DEFINED__
#define __IHTMLPaintSite_FWD_DEFINED__
typedef interface IHTMLPaintSite IHTMLPaintSite;
#endif     /* __IHTMLPaintSite_FWD_DEFINED__ */
typedef enum _HTML_PAINTER
{
    HTMLPAINTER_OPAQUE = 0x000001,
    HTMLPAINTER_TRANSPARENT = 0x000002,
    HTMLPAINTER_ALPHA = 0x000004,
    HTMLPAINTER_COMPLEX = 0x000008,
    HTMLPAINTER_OVERLAY = 0x000010,
    HTMLPAINTER_HITTEST = 0x000020,
    HTMLPAINTER_SURFACE = 0x000100,
    HTMLPAINTER_3DSURFACE = 0x000200,
    HTMLPAINTER_NOBAND = 0x000400,
    HTMLPAINTER_NODC = 0x001000,
    HTMLPAINTER_NOPHYSICALCLIP = 0x002000,
    HTMLPAINTER_NOSAVEDC = 0x004000,
    HTMLPAINTER_SUPPORTS_XFORM = 0x008000,
    HTMLPAINTER_EXPAND = 0x010000,
    HTMLPAINTER_NOSCROLLBITS = 0x020000,
    HTML_PAINTER_Max = 2147483647L
} HTML_PAINTER;

typedef struct IHTMLElement IHTMLElement;

EXTERN_C const ENUMDESC s_enumdescHTML_PAINTER;

typedef enum _HTML_PAINT_ZORDER
{
    HTMLPAINT_ZORDER_NONE = 0,
    HTMLPAINT_ZORDER_REPLACE_ALL = 1,
    HTMLPAINT_ZORDER_REPLACE_CONTENT = 2,
    HTMLPAINT_ZORDER_REPLACE_BACKGROUND = 3,
    HTMLPAINT_ZORDER_BELOW_CONTENT = 4,
    HTMLPAINT_ZORDER_BELOW_FLOW = 5,
    HTMLPAINT_ZORDER_ABOVE_FLOW = 6,
    HTMLPAINT_ZORDER_ABOVE_CONTENT = 7,
    HTMLPAINT_ZORDER_WINDOW_TOP = 8,
    HTML_PAINT_ZORDER_Max = 2147483647L
} HTML_PAINT_ZORDER;


EXTERN_C const ENUMDESC s_enumdescHTML_PAINT_ZORDER;

typedef enum _HTML_PAINT_DRAW_FLAGS
{
    HTMLPAINT_DRAW_UPDATEREGION = 0x000001,
    HTMLPAINT_DRAW_USE_XFORM = 0x000002,
    HTML_PAINT_DRAW_FLAGS_Max = 2147483647L
} HTML_PAINT_DRAW_FLAGS;


EXTERN_C const ENUMDESC s_enumdescHTML_PAINT_DRAW_FLAGS;

typedef enum _HTML_PAINT_EVENT_FLAGS
{
    HTMLPAINT_EVENT_TARGET = 0x0001,
    HTMLPAINT_EVENT_SETCURSOR = 0x0002,
    HTML_PAINT_EVENT_FLAGS_Max = 2147483647L
} HTML_PAINT_EVENT_FLAGS;


EXTERN_C const ENUMDESC s_enumdescHTML_PAINT_EVENT_FLAGS;

typedef enum _HTML_PAINT_DRAW_INFO_FLAGS
{
    HTMLPAINT_DRAWINFO_VIEWPORT = 0x000001,
    HTMLPAINT_DRAWINFO_UPDATEREGION = 0x000002,
    HTMLPAINT_DRAWINFO_XFORM = 0x000004,
    HTML_PAINT_DRAW_INFO_FLAGS_Max = 2147483647L
} HTML_PAINT_DRAW_INFO_FLAGS;


EXTERN_C const ENUMDESC s_enumdescHTML_PAINT_DRAW_INFO_FLAGS;

typedef struct _HTML_PAINTER_INFO
{
    LONG lFlags;
    LONG lZOrder;
    IID iidDrawObject;
    RECT rcExpand;
} HTML_PAINTER_INFO;

typedef struct _HTML_PAINT_XFORM
{
    FLOAT eM11;
    FLOAT eM12;
    FLOAT eM21;
    FLOAT eM22;
    FLOAT eDx;
    FLOAT eDy;
} HTML_PAINT_XFORM;

typedef struct _HTML_PAINT_DRAW_INFO
{
    RECT rcViewport;
    HRGN hrgnUpdate;
    HTML_PAINT_XFORM xform;
} HTML_PAINT_DRAW_INFO;


#ifndef __IHTMLPainter_INTERFACE_DEFINED__

#define __IHTMLPainter_INTERFACE_DEFINED__

EXTERN_C const IID IID_IHTMLPainter;


MIDL_INTERFACE("3050f6a6-98b5-11cf-bb82-00aa00bdce0b")
IHTMLPainter : public IUnknown
{
public:
    virtual HRESULT STDMETHODCALLTYPE Draw(
            /* [in] */ RECT rcBounds,/* [in] */ RECT rcUpdate,/* [in] */ LONG lDrawFlags,/* [in] */ HDC hdc,/* [in] */ LPVOID pvDrawObject) = 0;

    virtual HRESULT STDMETHODCALLTYPE OnResize(
            /* [in] */ SIZE size) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetPainterInfo(
            /* [out] */ HTML_PAINTER_INFO* pInfo) = 0;

    virtual HRESULT STDMETHODCALLTYPE HitTestPoint(
            /* [in] */ POINT pt,/* [out] */ BOOL* pbHit,/* [out] */ LONG* plPartID) = 0;

};

#endif     /* __IHTMLPainter_INTERFACE_DEFINED__ */


#ifndef __IHTMLPainterEventInfo_INTERFACE_DEFINED__

#define __IHTMLPainterEventInfo_INTERFACE_DEFINED__

EXTERN_C const IID IID_IHTMLPainterEventInfo;


MIDL_INTERFACE("3050f6df-98b5-11cf-bb82-00aa00bdce0b")
IHTMLPainterEventInfo : public IUnknown
{
public:
    virtual HRESULT STDMETHODCALLTYPE GetEventInfoFlags(
            /* [out] */ long* plEventInfoFlags) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetEventTarget(
            /* [in] */ IHTMLElement** ppElement) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetCursor(
            /* [in] */ LONG lPartID) = 0;

    virtual HRESULT STDMETHODCALLTYPE StringFromPartID(
            /* [in] */ LONG lPartID,/* [out] */ BSTR* pbstrPart) = 0;

};

#endif     /* __IHTMLPainterEventInfo_INTERFACE_DEFINED__ */


#ifndef __IHTMLPainterOverlay_INTERFACE_DEFINED__

#define __IHTMLPainterOverlay_INTERFACE_DEFINED__

EXTERN_C const IID IID_IHTMLPainterOverlay;


MIDL_INTERFACE("3050f7e3-98b5-11cf-bb82-00aa00bdce0b")
IHTMLPainterOverlay : public IUnknown
{
public:
    virtual HRESULT STDMETHODCALLTYPE OnMove(
            /* [in] */ RECT rcDevice) = 0;

};

#endif     /* __IHTMLPainterOverlay_INTERFACE_DEFINED__ */


#ifndef __IHTMLPaintSite_INTERFACE_DEFINED__

#define __IHTMLPaintSite_INTERFACE_DEFINED__

EXTERN_C const IID IID_IHTMLPaintSite;


MIDL_INTERFACE("3050f6a7-98b5-11cf-bb82-00aa00bdce0b")
IHTMLPaintSite : public IUnknown
{
public:
    virtual HRESULT STDMETHODCALLTYPE InvalidatePainterInfo(
            ) = 0;

    virtual HRESULT STDMETHODCALLTYPE InvalidateRect(
            /* [in] */ RECT* prcInvalid) = 0;

    virtual HRESULT STDMETHODCALLTYPE InvalidateRegion(
            /* [in] */ HRGN rgnInvalid) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetDrawInfo(
            /* [in] */ LONG lFlags,/* [out] */ HTML_PAINT_DRAW_INFO* pDrawInfo) = 0;

    virtual HRESULT STDMETHODCALLTYPE TransformGlobalToLocal(
            /* [in] */ POINT ptGlobal,/* [out] */ POINT* pptLocal) = 0;

    virtual HRESULT STDMETHODCALLTYPE TransformLocalToGlobal(
            /* [in] */ POINT ptLocal,/* [out] */ POINT* pptGlobal) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetHitTestCookie(
            /* [out] */ LONG* plCookie) = 0;

};

#endif     /* __IHTMLPaintSite_INTERFACE_DEFINED__ */



#endif /*__painter_h__*/

